Portfolios and CAPM: Portfolio Constraints


Kerry Back

BUSI 721, Fall 2022
JGSB, Rice University

There are various reasons to impose ex-ante constraints on portfolio weights.

  • The inputs are not 100% trustworthy, so we may want to over-ride extreme allocations.
  • We may not want to choose or recommend a long-term short position in a major asset class.
  • Likewise, we may think we should have at least some minimum investment in some asset classes.
  • There are costs to short selling (borrowing fee, limited use of the proceeds) so we may want to rule it out.

No Short Sales

minimize \(\frac{\text{A}}{2}w^⊤\text{C}w-x_sr_s+x_br_b-\bar{r}^⊤w\)

subject to \(-x_s \leq 0, -x_b \leq 0, x_s-x_b+1_n^⊤w=1\)

and \(-w < 0\)

-choice vector: \((x_s,x_b,w)^⊤\)
-\(\text{n} \times \text{n}\) quadratic term with zeros and \(\text{AC}\) in bottom right
-linear term: \((-1,1,-\bar{r})^⊤\)
-\(\text{n} \times \text{n}\) inequality matrix = -I
-\(1 \times \text{n}\) equality matrix: (1,-1,1_n)
-right-hand side of inequality =0’s, right-hand side of equality=1

rs = 0.04
rb = 0.08

# quadratic and linear terms
Q = np.zeros((5, 5))
Q[2:, 2:] = raver*C
p = np.concatenate(([-rs, rb], -means))

# inequalities
G = - np.identity(5)
h = np.zeros(2)

# equalities
A = np.concatenate(([1, -1], np.ones(3)))
b = np.ones(1)

from last session, only changing \(\text{G}\)

from cvxopt import matrix
from cvxopt.solvers import qp

Q = matrix(Q, (5, 5))
p = matrix(p, (5, 1))
G = matrix(G, (2, 5))
h = matrix(h, (2, 1))
A = matrix(A, (1, 5))
b = matrix(b, (1, 1))

sol = qp(Q, p, G, h, A, b)
xs, xb, w1, w2, w3 = np.array(sol["x"])

Same as last session. Solution is the same too for these parameters.

Prohibiting short sales doesn’t matter to someone who doesn’t want to short anyway.

How Much do Constraints Matter?

  • It depends on the inputs.
  • With high correlations and a large difference in expected returns, shorting can greatly improve performance.
  • When there are many assets (and many errors in inputs) the solver is likely to find two portfolios with high correlations and a large difference in expected returns.
  • With a large number of assets, some grouping is normally done before running the optimizer. For example, optimize over asset classes.

3L

HTML tutorial